abstract class Shape {
    abstract public void draw();
}
class Rect extends Shape {
    private double length;
    private double width;

    Rect(double length,double width) {
        this.length = length;
        this.width = width;
    }
    public void draw() {
        System.out.println("矩形，长：" + length + "宽：" + width);
    }
}
class Animal {
    public String name = "阿福";
    public int age;

    public void eat() {
        System.out.println(name + "正在吃东西");
    }
}
class Dog extends Animal {
    //public String name = "旺财";
    public void wag() {
        super.name = "旺财";
        System.out.println(super.name + "在摇尾巴");
    }
    public void eat() {
        System.out.println(super.name + "吃完了");
    }
}
class Cat extends Animal {
    public void mew() {
        System.out.println(name + "在喵喵叫");
    }
}
public class Test {
    public static void main(String[] args) {
        /*
        Dog dog1 = new Dog();
        System.out.println(dog1.name);
        System.out.println(dog1.age);
        dog1.eat();
        dog1.wag();
        */
        Rect rect1 = new Rect(10.11,2.33);
        rect1.draw();
    }
}
